<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOrderCustomsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_customs', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('order_id')->unique()->comment('订单号');
            $table->char('invt_no', 18)->default('')->comment('清单号');
            $table->char('pre_no', 18)->default('')->comment('预录入编号');
            $table->string('file')->nullable()->comment('清关文件');
            $table->bigInteger('last_time')->default(0)->comment('最新回执记录时间');
            $table->string('info', 500)->nullable()->comment('最新回执备注');
            $table->char('status', 3)->default(0)->comment('状态: 0 待发送 1 已发送 2 海关接收 100 海关退单 300 人工审核 399 海关审结 800 放行 899 结关 500 查验 501 扣留移送通关 502 扣留移送缉私 503 扣留移送法规 599 其它扣留 700 退运 ');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_customs');
    }
}
